Package | sora.graybox.synth |
Class | public class SampleData |
Inheritance | SampleData ![]() |
See also
Property | Defined By | ||
---|---|---|---|
channelCount : int = 0 | SampleData | ||
loopE : int = 0 | SampleData | ||
loopF : int = 0 | SampleData | ||
loopFk : int = 0 | SampleData | ||
pgKey : int = 0 | SampleData | ||
pgPitch : int = 0 | SampleData | ||
pgSample : int = 0 | SampleData | ||
plbkE : int = 0 | SampleData | ||
plbkS : int = 0 | SampleData | ||
sampleData : Vector.<int> = null | SampleData | ||
sampleFrames : int = 0 | SampleData |
Method | Defined By | ||
---|---|---|---|
SampleDataオブジェクトを構築します. | SampleData | ||
clear():void
波形データを放棄し、パラメーターをクリアします. | SampleData | ||
copy(from:SampleData, deepCopy:Boolean = false):void
SampleDataオブジェクトをコピーします. | SampleData | ||
getChannelCount():int
波形データのチャンネル数を取得します. | SampleData | ||
getLoopable():Boolean
サンプルデータがループできる状態にあるかを真偽値で取得します. | SampleData | ||
getLoopEndPoint():int
サンプルデータのループ終了位置を取得します. | SampleData | ||
getLoopStartPoint():int
サンプルデータのループ開始位置を取得します. | SampleData | ||
getPlayBackEndPoint():int
サンプルデータのプレイバック停止位置を取得します. | SampleData | ||
getPlayBackStartPoint():int
サンプルデータのプレイバック開始位置を取得します. | SampleData | ||
getRecPitch():Number
サンプルデータの音程ピッチを取得します. | SampleData | ||
getSampleFrames():int
波形データのサンプルフレーム数(チャンネルあたりサンプル数)を取得します. | SampleData | ||
getSampleRate():Number
波形データのサンプリング周波数を設定します. | SampleData | ||
loadPCMData(dat:ByteArray, sampleFrames:int, ch:int, bitRate:int, sign:Boolean, bigEndian:Boolean):void
バイナリのPCMデータから波形を読み込みます. | SampleData | ||
loadPCMSamples(wave:Vector.<Number>, ch:int):void
PCMデータから波形を読み込みます. | SampleData | ||
resetLoopPoints(start:int = 0, end:int = 0):void
サンプルデータのループ範囲を再設定します. | SampleData | ||
setPlaybackRange(start:int, end:int):void
サンプルデータのプレイバック範囲を設定します. | SampleData | ||
setRecPitch(pitch:Number):void
サンプルデータの音程ピッチを設定します. | SampleData | ||
setSampleRate(sampleRate:Number):void
波形データのサンプリング周波数を設定します. | SampleData |
channelCount | property |
public var channelCount:int = 0
loopE | property |
public var loopE:int = 0
loopF | property |
public var loopF:int = 0
loopFk | property |
public var loopFk:int = 0
pgKey | property |
public var pgKey:int = 0
pgPitch | property |
public var pgPitch:int = 0
pgSample | property |
public var pgSample:int = 0
plbkE | property |
public var plbkE:int = 0
plbkS | property |
public var plbkS:int = 0
sampleData | property |
public var sampleData:Vector.<int> = null
sampleFrames | property |
public var sampleFrames:int = 0
SampleData | () | Constructor |
public function SampleData()
SampleDataオブジェクトを構築します.
clear | () | method |
public function clear():void
波形データを放棄し、パラメーターをクリアします.
copy | () | method |
public function copy(from:SampleData, deepCopy:Boolean = false):void
SampleDataオブジェクトをコピーします. deepCopyにtrueを渡して実行すると波形データをディープコピーします。 falseを渡して実行すると波形データの参照だけ渡します。
Parameters
from:SampleData — コピー元SampleDataオブジェクト
| |
deepCopy:Boolean (default = false ) — 波形データのディープコピーオプション
|
getChannelCount | () | method |
public function getChannelCount():int
波形データのチャンネル数を取得します.
Returnsint — チャンネル数
|
getLoopable | () | method |
public function getLoopable():Boolean
サンプルデータがループできる状態にあるかを真偽値で取得します.
ReturnsBoolean — ループできる状態にあればtrue
|
getLoopEndPoint | () | method |
public function getLoopEndPoint():int
サンプルデータのループ終了位置を取得します.
|------------ Wave Range ------------| | | | | | | | | /\ /\| /\| /\ | | |---|\/ \ / |\ / |\/ \/--|-----| | | \/ | \/ | | | | | | | | | | | | | | | | | | | |PlayBack End (SoundOff) | | | |Release (KeyOff) | | | |Loop End | | |Loop Start | |PlayBack Start (KeyOn)
int — ループ終了位置
|
getLoopStartPoint | () | method |
public function getLoopStartPoint():int
サンプルデータのループ開始位置を取得します.
|------------ Wave Range ------------| | | | | | | | | /\ /\| /\| /\ | | |---|\/ \ / |\ / |\/ \/--|-----| | | \/ | \/ | | | | | | | | | | | | | | | | | | | |PlayBack End (SoundOff) | | | |Release (KeyOff) | | | |Loop End | | |Loop Start | |PlayBack Start (KeyOn)
int — ループ開始位置
|
getPlayBackEndPoint | () | method |
public function getPlayBackEndPoint():int
サンプルデータのプレイバック停止位置を取得します.
|------------ Wave Range ------------| | | | | | | | | /\ /\| /\| /\ | | |---|\/ \ / |\ / |\/ \/--|-----| | | \/ | \/ | | | | | | | | | | | | | | | | | | | |PlayBack End (SoundOff) | | | |Release (KeyOff) | | | |Loop End | | |Loop Start | |PlayBack Start (KeyOn)
int — プレイバック停止位置
|
getPlayBackStartPoint | () | method |
public function getPlayBackStartPoint():int
サンプルデータのプレイバック開始位置を取得します.
|------------ Wave Range ------------| | | | | | | | | /\ /\| /\| /\ | | |---|\/ \ / |\ / |\/ \/--|-----| | | \/ | \/ | | | | | | | | | | | | | | | | | | | |PlayBack End (SoundOff) | | | |Release (KeyOff) | | | |Loop End | | |Loop Start | |PlayBack Start (KeyOn)
int — プレイバック開始位置
|
getRecPitch | () | method |
public function getRecPitch():Number
サンプルデータの音程ピッチを取得します.
ReturnsNumber — 音程ピッチ(Hz)
|
getSampleFrames | () | method |
public function getSampleFrames():int
波形データのサンプルフレーム数(チャンネルあたりサンプル数)を取得します.
Returnsint — サンプルフレーム数
|
getSampleRate | () | method |
public function getSampleRate():Number
波形データのサンプリング周波数を設定します.
ReturnsNumber — サンプリング周波数(Hz)
|
loadPCMData | () | method |
public function loadPCMData(dat:ByteArray, sampleFrames:int, ch:int, bitRate:int, sign:Boolean, bigEndian:Boolean):void
バイナリのPCMデータから波形を読み込みます.
Parameters
dat:ByteArray — PCM波形データ
| |
sampleFrames:int — サンプルフレーム数(チャンネルあたりサンプル数)
| |
ch:int — チャンネル数(1~)
| |
bitRate:int — サンプルビットレート(8,16,24,32)
| |
sign:Boolean — 符号あり波形値の場合true
| |
bigEndian:Boolean — データのバイトオーダーがビッグエンディアンの場合true
|
loadPCMSamples | () | method |
public function loadPCMSamples(wave:Vector.<Number>, ch:int):void
PCMデータから波形を読み込みます.
Parameters
wave:Vector.<Number> — PCM波形データ[浮動小数点数-1.0~1.0]
| |
ch:int — チャンネル数(1~)
|
resetLoopPoints | () | method |
public function resetLoopPoints(start:int = 0, end:int = 0):void
サンプルデータのループ範囲を再設定します.
|------------ Wave Range ------------| | | | | | | | | /\ /\| /\| /\ | | |---|\/ \ / |\ / |\/ \/--|-----| | | \/ | \/ | | | | | | | | | | | | | | | | | | | |PlayBack End (SoundOff) | | | |Release (KeyOff) | | | |Loop End | | |Loop Start | |PlayBack Start (KeyOn)
Parameters
start:int (default = 0 ) — ループ開始位置
| |
end:int (default = 0 ) — ループ終了位置
|
setPlaybackRange | () | method |
public function setPlaybackRange(start:int, end:int):void
サンプルデータのプレイバック範囲を設定します.
|------------ Wave Range ------------| | | | | | | | | /\ /\| /\| /\ | | |---|\/ \ / |\ / |\/ \/--|-----| | | \/ | \/ | | | | | | | | | | | | | | | | | | | |PlayBack End (SoundOff) | | | |Release (KeyOff) | | | |Loop End | | |Loop Start | |PlayBack Start (KeyOn)
Parameters
start:int — プレイバック開始位置
| |
end:int — プレイバック停止位置
|
setRecPitch | () | method |
public function setRecPitch(pitch:Number):void
サンプルデータの音程ピッチを設定します. 音程ピッチは、サンプルデータをインストゥルメントの音色プリセットとして利用する場合に設定する必要があります。
Parameters
pitch:Number — 音程ピッチ(Hz)
|
setSampleRate | () | method |
public function setSampleRate(sampleRate:Number):void
波形データのサンプリング周波数を設定します.
Parameters
sampleRate:Number — サンプリング周波数(Hz)
|